#pragma once
#include "sapi.h"

#include <vector>
#include <string>

class CSpEvent;

class SAPIEventCallback
{
public:
	SAPIEventCallback(){}
	virtual ~SAPIEventCallback(){}

	virtual void NotifySAPIEventCallback(CSpEvent* e) = 0;
};

class SAPIEventCallbackImpl :
	public ISpNotifySink
{
public:
	SAPIEventCallbackImpl(void);
	~SAPIEventCallbackImpl(void);

	HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObject);
	ULONG STDMETHODCALLTYPE AddRef();
	ULONG STDMETHODCALLTYPE Release();
	HRESULT STDMETHODCALLTYPE Notify();

	ISpVoice* pVoice;
	SAPIEventCallback* owner;

private:
	int refCount;
};
